# Traditional vs IoT system comparison
traditional_water <- 150 # liters per day
iot_water <- water_per_day
water_savings_percent <- ((traditional_water - iot_water) / traditional_water) * 100
water_cost_per_liter <- 0.05 # USD
daily_water_savings <- (traditional_water - iot_water) * water_cost_per_liter
annual_water_savings <- daily_water_savings * 365
# Labor savings
traditional_labor_hours <- 2 # hours per day
iot_labor_hours <- 0.5
labor_cost_per_hour <- 3 # USD
daily_labor_savings <- (traditional_labor_hours - iot_labor_hours) * labor_cost_per_hour
annual_labor_savings <- daily_labor_savings * 365
# System cost
system_cost <- 180 # USD
annual_maintenance <- 30 # USD
# Total savings
total_annual_savings <- annual_water_savings + annual_labor_savings - annual_maintenance
roi_months <- system_cost / (total_annual_savings / 12)
cost_benefit_data <- tibble(
Category = c(
"Water Consumption (L/day)",
"Water Cost Savings ($/day)",
"Labor Time (hours/day)",
"Labor Cost Savings ($/day)",
"Annual Water Savings ($)",
"Annual Labor Savings ($)",
"Annual Maintenance Cost ($)",
"Total Annual Net Savings ($)",
"System Cost ($)",
"ROI Period (months)"
),
Traditional = c(
traditional_water, NA, traditional_labor_hours, NA, NA, NA, NA, NA, NA, NA
),
IoT_System = c(
round(iot_water, 2),
round(daily_water_savings, 2),
iot_labor_hours,
round(daily_labor_savings, 2),
round(annual_water_savings, 2),
round(annual_labor_savings, 2),
annual_maintenance,
round(total_annual_savings, 2),
system_cost,
round(roi_months, 1)
),
Improvement = c(
paste0(round(water_savings_percent, 1), "%"),
paste0("+$", round(daily_water_savings, 2)),
paste0(round((traditional_labor_hours - iot_labor_hours) / traditional_labor_hours * 100, 1), "%"),
paste0("+$", round(daily_labor_savings, 2)),
paste0("+$", round(annual_water_savings, 2)),
paste0("+$", round(annual_labor_savings, 2)),
paste0("-$", annual_maintenance),
paste0("+$", round(total_annual_savings, 2)),
"-",
paste0(round(roi_months, 1), " months")
)
)
cost_benefit_data